﻿#pragma once

#include "ais_box.h"
#include "geom/geom_curve.h"
#include "topo/topo_base.h"

namespace CAGD
{

/**
 * 交互曲线.
 */
class AIS_Curve : public AIS_Base
{
  public:
    /**
     * @brief 基本构造.
     * @param curve
     * @see
     */
    AIS_Curve(Handle(GeomCurve) curve, bool pure = false);

    /**
     * @brief 基本构造.
     * @param edge
     * @see
     */
    AIS_Curve(Handle(TopoEdge) edge, bool pure = false);

    /**
     * @brief 检测函数.
     * @return
     * @param pos
     * @see
     */
    bool MoveTo(Point pos) override;

    /**
     * @brief 刷新信息.
     * @return
     * @see
     */
    void UpdateInfo() override;

    /**
     * @brief 获得类型.
     * @return
     * @see
     */
    AIS_Type GetType() const override;

    /**
     * @brief 获得曲线.
     * @return
     * @see
     */
    Handle(GeomCurve) GetCurve() const;

    /**
     * @brief 获得拓扑边.
     * @return
     * @see
     */
    Handle(TopoEdge) GetEdge() const;

  protected:
    Handle(TopoEdge) m_edge;
};

} // namespace CAGD
